﻿// ----------------------------------------------------------------
// Description : 实体类,该文件由MyGeneration生成
// Author      : 
// Create date : 2010/7/21
// ----------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace ITOMMS.Entity
{
    /// <summary>
    ///	tbCustEmpSoftList Entity
    ///	tbCustEmpSoftList Entity客户员工软件列表
    /// </summary>
    [Serializable]
    public class tbCustEmpSoftListEntity : BaseEntity<tbCustEmpSoftListEntity, int>
    {

        #region 私有成员

        private int _ID;
        private int? _所属公司;
        private int? _所属员工;
        private int? _主机类型;
        private int? _操作系统;
        private int? _系统优化软件;
        private int? _PDF软件;
        private int? _办公软件;
        private int? _邮件收发软件;
        private int? _聊天软件1;
        private int? _聊天软件2;
        private int? _视频播放软件1;
        private int? _视频播放软件2;
        private int? _音乐播放软件;
        private int? _WEB浏览软件;
        private int? _下载软件;
        private int? _系统备份软件;
        private int? _压缩软件;
        private int? _平面设计软件1;
        private int? _平面设计软件2;
        private int? _平面设计软件3;
        private int? _平面设计软件4;
        private int? _三维设计软件1;
        private int? _三维设计软件2;
        private int? _网页制作软件1;
        private int? _网页制作软件2;
        private int? _财务软件1;
        private int? _财务软件2;
        private int? _财务软件3;
        private int? _财务软件4;
        private int? _杀毒软件;
        private int? _安全防护软件;
        private string _打印机1;
        private string _打印机2;
        private string _打印机3;
        private string _打印机4;
        private string _扫描仪1;
        private string _扫描仪2;
        private string _Remarks;
        private DateTime? _CreateDate;
        private int? _CreateBy;
        private DateTime? _ModifyDate;
        private int? _ModifyBy;
        private int _SEQNO;
        #endregion



        #region 默认( 空 ) 构造函数
        /// <summary>
        /// 默认构造函数
        /// </summary>
        public tbCustEmpSoftListEntity()
        {
            _ID = 0;
            _所属公司 = null;
            _所属员工 = null;
            _主机类型 = null;
            _操作系统 = null;
            _系统优化软件 = null;
            _PDF软件 = null;
            _办公软件 = null;
            _邮件收发软件 = null;
            _聊天软件1 = null;
            _聊天软件2 = null;
            _视频播放软件1 = null;
            _视频播放软件2 = null;
            _音乐播放软件 = null;
            _WEB浏览软件 = null;
            _下载软件 = null;
            _系统备份软件 = null;
            _压缩软件 = null;
            _平面设计软件1 = null;
            _平面设计软件2 = null;
            _平面设计软件3 = null;
            _平面设计软件4 = null;
            _三维设计软件1 = null;
            _三维设计软件2 = null;
            _网页制作软件1 = null;
            _网页制作软件2 = null;
            _财务软件1 = null;
            _财务软件2 = null;
            _财务软件3 = null;
            _财务软件4 = null;
            _杀毒软件 = null;
            _安全防护软件 = null;
            _打印机1 = String.Empty;
            _打印机2 = String.Empty;
            _打印机3 = String.Empty;
            _打印机4 = String.Empty;
            _扫描仪1 = String.Empty;
            _扫描仪2 = String.Empty;
            _Remarks = String.Empty;
            _CreateDate = null;
            _CreateBy = null;
            _ModifyDate = null;
            _ModifyBy = null;
            _SEQNO = 0;
        }
        #endregion

        #region 属性值校验

        /// <summary>
        /// 属性值校验
        /// </summary>
        public bool CheckValues()
        {
            bool bResult = true;
            string strError = "";

            if (_ID == 0)
            {
                bResult = false;
                strError += "\r\n 非空值不能为: " + _ID;
            }

            if (!bResult)
                throw new ArgumentOutOfRangeException(strError);
            return bResult;

        }

        #endregion




        #region Required Fields Only Constructor

        /// <summary>
        /// required (not null) fields only constructor
        /// </summary>
        public tbCustEmpSoftListEntity(
        int para_ID)
            : this()
        {
            _ID = para_ID;
            _所属公司 = null;
            _所属员工 = null;
            _主机类型 = null;
            _操作系统 = null;
            _系统优化软件 = null;
            _PDF软件 = null;
            _办公软件 = null;
            _邮件收发软件 = null;
            _聊天软件1 = null;
            _聊天软件2 = null;
            _视频播放软件1 = null;
            _视频播放软件2 = null;
            _音乐播放软件 = null;
            _WEB浏览软件 = null;
            _下载软件 = null;
            _系统备份软件 = null;
            _压缩软件 = null;
            _平面设计软件1 = null;
            _平面设计软件2 = null;
            _平面设计软件3 = null;
            _平面设计软件4 = null;
            _三维设计软件1 = null;
            _三维设计软件2 = null;
            _网页制作软件1 = null;
            _网页制作软件2 = null;
            _财务软件1 = null;
            _财务软件2 = null;
            _财务软件3 = null;
            _财务软件4 = null;
            _杀毒软件 = null;
            _安全防护软件 = null;
            _打印机1 = String.Empty;
            _打印机2 = String.Empty;
            _打印机3 = String.Empty;
            _打印机4 = String.Empty;
            _扫描仪1 = String.Empty;
            _扫描仪2 = String.Empty;
            _Remarks = String.Empty;
            _CreateDate = null;
            _CreateBy = null;
            _ModifyDate = null;
            _ModifyBy = null;
        }
        #endregion


        #region 公有属性

        /// <summary>
        /// 行号，顺序号。系统默认的属性,对这个属性不要作操作.属性值在架构中已经处理
        /// </summary>
        public virtual int SEQNO
        {
            get { return _SEQNO; }
            set { _SEQNO = value; }
        }


        /// <summary>
        /// IDID
        /// </summary>		
        public virtual int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        /// <summary>
        /// 所属公司所属公司
        /// </summary>		
        public virtual int? 所属公司
        {
            get { return _所属公司; }
            set { _所属公司 = value; }
        }

        /// <summary>
        /// 所属员工所属员工
        /// </summary>		
        public virtual int? 所属员工
        {
            get { return _所属员工; }
            set { _所属员工 = value; }
        }

        /// <summary>
        /// 主机类型主机类型
        /// </summary>		
        public virtual int? 主机类型
        {
            get { return _主机类型; }
            set { _主机类型 = value; }
        }

        /// <summary>
        /// 操作系统操作系统
        /// </summary>		
        public virtual int? 操作系统
        {
            get { return _操作系统; }
            set { _操作系统 = value; }
        }

        /// <summary>
        /// 系统优化软件系统优化软件
        /// </summary>		
        public virtual int? 系统优化软件
        {
            get { return _系统优化软件; }
            set { _系统优化软件 = value; }
        }

        /// <summary>
        /// PDF软件PDF软件
        /// </summary>		
        public virtual int? PDF软件
        {
            get { return _PDF软件; }
            set { _PDF软件 = value; }
        }

        /// <summary>
        /// 办公软件办公软件
        /// </summary>		
        public virtual int? 办公软件
        {
            get { return _办公软件; }
            set { _办公软件 = value; }
        }

        /// <summary>
        /// 邮件收发软件邮件收发软件
        /// </summary>		
        public virtual int? 邮件收发软件
        {
            get { return _邮件收发软件; }
            set { _邮件收发软件 = value; }
        }

        /// <summary>
        /// 聊天软件1聊天软件1
        /// </summary>		
        public virtual int? 聊天软件1
        {
            get { return _聊天软件1; }
            set { _聊天软件1 = value; }
        }

        /// <summary>
        /// 聊天软件2聊天软件2
        /// </summary>		
        public virtual int? 聊天软件2
        {
            get { return _聊天软件2; }
            set { _聊天软件2 = value; }
        }

        /// <summary>
        /// 视频播放软件1视频播放软件1
        /// </summary>		
        public virtual int? 视频播放软件1
        {
            get { return _视频播放软件1; }
            set { _视频播放软件1 = value; }
        }

        /// <summary>
        /// 视频播放软件2视频播放软件2
        /// </summary>		
        public virtual int? 视频播放软件2
        {
            get { return _视频播放软件2; }
            set { _视频播放软件2 = value; }
        }

        /// <summary>
        /// 音乐播放软件音乐播放软件
        /// </summary>		
        public virtual int? 音乐播放软件
        {
            get { return _音乐播放软件; }
            set { _音乐播放软件 = value; }
        }

        /// <summary>
        /// WEB浏览软件WEB浏览软件
        /// </summary>		
        public virtual int? WEB浏览软件
        {
            get { return _WEB浏览软件; }
            set { _WEB浏览软件 = value; }
        }

        /// <summary>
        /// 下载软件下载软件
        /// </summary>		
        public virtual int? 下载软件
        {
            get { return _下载软件; }
            set { _下载软件 = value; }
        }

        /// <summary>
        /// 系统备份软件系统备份软件
        /// </summary>		
        public virtual int? 系统备份软件
        {
            get { return _系统备份软件; }
            set { _系统备份软件 = value; }
        }

        /// <summary>
        /// 压缩软件压缩软件
        /// </summary>		
        public virtual int? 压缩软件
        {
            get { return _压缩软件; }
            set { _压缩软件 = value; }
        }

        /// <summary>
        /// 平面设计软件1平面设计软件1
        /// </summary>		
        public virtual int? 平面设计软件1
        {
            get { return _平面设计软件1; }
            set { _平面设计软件1 = value; }
        }

        /// <summary>
        /// 平面设计软件2平面设计软件2
        /// </summary>		
        public virtual int? 平面设计软件2
        {
            get { return _平面设计软件2; }
            set { _平面设计软件2 = value; }
        }

        /// <summary>
        /// 平面设计软件3平面设计软件3
        /// </summary>		
        public virtual int? 平面设计软件3
        {
            get { return _平面设计软件3; }
            set { _平面设计软件3 = value; }
        }

        /// <summary>
        /// 平面设计软件4平面设计软件4
        /// </summary>		
        public virtual int? 平面设计软件4
        {
            get { return _平面设计软件4; }
            set { _平面设计软件4 = value; }
        }

        /// <summary>
        /// 三维设计软件1三维设计软件1
        /// </summary>		
        public virtual int? 三维设计软件1
        {
            get { return _三维设计软件1; }
            set { _三维设计软件1 = value; }
        }

        /// <summary>
        /// 三维设计软件2三维设计软件2
        /// </summary>		
        public virtual int? 三维设计软件2
        {
            get { return _三维设计软件2; }
            set { _三维设计软件2 = value; }
        }

        /// <summary>
        /// 网页制作软件1网页制作软件1
        /// </summary>		
        public virtual int? 网页制作软件1
        {
            get { return _网页制作软件1; }
            set { _网页制作软件1 = value; }
        }

        /// <summary>
        /// 网页制作软件2网页制作软件2
        /// </summary>		
        public virtual int? 网页制作软件2
        {
            get { return _网页制作软件2; }
            set { _网页制作软件2 = value; }
        }

        /// <summary>
        /// 财务软件1财务软件1
        /// </summary>		
        public virtual int? 财务软件1
        {
            get { return _财务软件1; }
            set { _财务软件1 = value; }
        }

        /// <summary>
        /// 财务软件2财务软件2
        /// </summary>		
        public virtual int? 财务软件2
        {
            get { return _财务软件2; }
            set { _财务软件2 = value; }
        }

        /// <summary>
        /// 财务软件3财务软件3
        /// </summary>		
        public virtual int? 财务软件3
        {
            get { return _财务软件3; }
            set { _财务软件3 = value; }
        }

        /// <summary>
        /// 财务软件4财务软件4
        /// </summary>		
        public virtual int? 财务软件4
        {
            get { return _财务软件4; }
            set { _财务软件4 = value; }
        }

        /// <summary>
        /// 杀毒软件杀毒软件
        /// </summary>		
        public virtual int? 杀毒软件
        {
            get { return _杀毒软件; }
            set { _杀毒软件 = value; }
        }

        /// <summary>
        /// 安全防护软件安全防护软件
        /// </summary>		
        public virtual int? 安全防护软件
        {
            get { return _安全防护软件; }
            set { _安全防护软件 = value; }
        }

        /// <summary>
        /// 打印机1打印机1
        /// </summary>		
        public virtual string 打印机1
        {
            get { return _打印机1; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 打印机1", value, value.ToString());

                _打印机1 = value;
            }
        }

        /// <summary>
        /// 打印机2打印机2
        /// </summary>		
        public virtual string 打印机2
        {
            get { return _打印机2; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 打印机2", value, value.ToString());

                _打印机2 = value;
            }
        }

        /// <summary>
        /// 打印机3打印机3
        /// </summary>		
        public virtual string 打印机3
        {
            get { return _打印机3; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 打印机3", value, value.ToString());

                _打印机3 = value;
            }
        }

        /// <summary>
        /// 打印机4打印机4
        /// </summary>		
        public virtual string 打印机4
        {
            get { return _打印机4; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 打印机4", value, value.ToString());

                _打印机4 = value;
            }
        }

        /// <summary>
        /// 扫描仪1扫描仪1
        /// </summary>		
        public virtual string 扫描仪1
        {
            get { return _扫描仪1; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 扫描仪1", value, value.ToString());

                _扫描仪1 = value;
            }
        }

        /// <summary>
        /// 扫描仪2扫描仪2
        /// </summary>		
        public virtual string 扫描仪2
        {
            get { return _扫描仪2; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for 扫描仪2", value, value.ToString());

                _扫描仪2 = value;
            }
        }

        /// <summary>
        /// Remarks备注
        /// </summary>		
        public virtual string Remarks
        {
            get { return _Remarks; }
            set
            {

                if (value != null)
                    if (value.Length > 100)
                        throw new ArgumentOutOfRangeException("Invalid value for Remarks", value, value.ToString());

                _Remarks = value;
            }
        }

        /// <summary>
        /// CreateDate创建时间
        /// </summary>		
        public virtual DateTime? CreateDate
        {
            get { return _CreateDate; }
            set { _CreateDate = value; }
        }

        /// <summary>
        /// CreateBy创建人
        /// </summary>		
        public virtual int? CreateBy
        {
            get { return _CreateBy; }
            set { _CreateBy = value; }
        }

        /// <summary>
        /// ModifyDate修改时间
        /// </summary>		
        public virtual DateTime? ModifyDate
        {
            get { return _ModifyDate; }
            set { _ModifyDate = value; }
        }

        /// <summary>
        /// ModifyBy修改人
        /// </summary>		
        public virtual int? ModifyBy
        {
            get { return _ModifyBy; }
            set { _ModifyBy = value; }
        }



        #endregion


        #region DAO操作


        /// <summary>
        /// 获取所有实体的列表
        /// </summary>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAll()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] ");

            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
                int seq = 0;
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }

        /// <summary>
        /// 获取所有实体的列表总行数
        /// </summary>
        /// <returns></returns>
        public override int GetTotalRecords()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("  select count([ID])  from [tb_CustEmpSoftList] ");

            Database db = GetDatabase();
            return (int)db.ExecuteScalar(CommandType.Text, strSql.ToString());
        }

        /// <summary>
        /// 获取所有实体的列表总行数
        /// </summary>
        /// <returns></returns>
        public override int GetTotalRecords(string sqlCondition)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("  select count([ID])  from [tb_CustEmpSoftList]  ");

            if (sqlCondition.Trim() != "")
            {
                strSql.Append(" where " + sqlCondition);
            }
            Database db = GetDatabase();
            return (int)db.ExecuteScalar(CommandType.Text, strSql.ToString());
        }


        /// <summary>
        /// 按条件查询,得到一页的对应的结果列表
        /// </summary>
        /// <param name="strWhere">条件</param>
        /// <param name="PageSize">每页大小</param>
        /// <param name="CurrentPageIndex">当前页码</param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere, int PageSize, int CurrentPageIndex)
        {
            StringBuilder strSql = new StringBuilder();
            if (strWhere.Contains("order".ToLower()))
            {
                throw new Exception("分页查询的sql条件中不能包括排序子句，请调用重载方法实现有条件的排序筛选");
            }

            strSql.Append("select top ").Append(PageSize).Append("  [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] where ");

            if (strWhere.Trim() != "")
            {
                strSql.Append("  " + strWhere + " and ");
            }
            strSql.Append(" ID not in ( ");
            strSql.Append(" select top ").Append(PageSize * (CurrentPageIndex - 1)).Append("  [ID] from [tb_CustEmpSoftList] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" ) ");

            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
                int seq = PageSize * (CurrentPageIndex - 1);
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }


        /// <summary>
        /// 按条件查询,得到一页的对应的结果列表
        /// </summary>
        /// <param name="strWhere">条件</param>
        /// <param name="PageSize">每页大小</param>
        /// <param name="CurrentPageIndex">当前页码</param>
        /// <param name="strSort">ex:order by id desc</param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere, string strSort, int PageSize, int CurrentPageIndex)
        {
            StringBuilder strSql = new StringBuilder();
            if (strWhere.Contains("order".ToLower()))
            {
                throw new Exception("分页查询的sql条件中不能包括排序子句，请调用重载方法实现有条件的排序筛选");
            }

            strSql.Append("select top ").Append(PageSize).Append("  [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] where ");

            if (strWhere.Trim() != "")
            {
                strSql.Append("  " + strWhere + " and ");
            }
            strSql.Append(" ID not in ( ");
            strSql.Append(" select top ").Append(PageSize * (CurrentPageIndex - 1)).Append("  [ID] from [tb_CustEmpSoftList] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere + " ").Append(strSort);
            }
            strSql.Append(" ) ").Append(strSort);

            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
                int seq = PageSize * (CurrentPageIndex - 1);
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }


        /// <summary>
        /// 按条件查询,得到对应的结果列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere)
        {
            strWhere = SQLInjectionFilter(strWhere);
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from tb_CustEmpSoftList ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
                int seq = 0;
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }



        /// <summary>
        /// 按条件查询,得到对应的结果列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="parameters">sql条件中的参数</param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere, List<IDataParameter> parameters)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            foreach (IDataParameter sp in parameters)
            {
                db.AddInParameter(dbCommand, sp.ParameterName, sp.DbType, sp.Value);
            }

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                int seq = 0;
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }






        /// <summary>
        /// 获取按条件查询以后的结果列表的前指定rowNumber行记录
        /// </summary>
        /// <param name="strWhere">不带where关键字的SQL条件语句</param>
        /// <param name="rowNumber"></param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere, List<IDataParameter> parameters, int rowNumber)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select top ").Append(rowNumber).Append("  [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            foreach (IDataParameter sp in parameters)
            {
                db.AddInParameter(dbCommand, sp.ParameterName, sp.DbType, sp.Value);
            }

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                int seq = 0;
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }


        /// <summary>
        /// 获取按条件查询以后的结果列表的前指定rowNumber行记录
        /// </summary>
        /// <param name="strWhere">不带where关键字的SQL条件语句: AND AA=@AA</param>
        /// <param name="rowNumber"></param>
        /// <returns></returns>
        public override List<tbCustEmpSoftListEntity> GetAllByQuery(string strWhere, int rowNumber)
        {
            strWhere = SQLInjectionFilter(strWhere);
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select top ").Append(rowNumber).Append("  [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList] ");

            if (strWhere.Trim() != "")
            {
                strSql.Append(" where  " + strWhere);
            }
            List<tbCustEmpSoftListEntity> list = new List<tbCustEmpSoftListEntity>();
            Database db = GetDatabase();
            using (IDataReader dataReader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
            {
                int seq = 0;
                while (dataReader.Read())
                {
                    seq++;
                    list.Add(ReaderBind(dataReader, seq));
                }
            }
            return list;
        }







        /// <summary>
        /// 按主键查询对应的实体
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        public override tbCustEmpSoftListEntity GetById(int id)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select [ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] from [tb_CustEmpSoftList]  where ID= @ID ");

            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, id);
            tbCustEmpSoftListEntity entity = null;
            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                if (dataReader.Read())
                {
                    entity = ReaderBind(dataReader);
                }
            }
            return entity;

        }


        /// <summary>
        /// 保存实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public override int Save()
        {

            if (this.ID == 0)
            {
                this.ID = GetMax("tb_CustEmpSoftList");
            }
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into  tb_CustEmpSoftList (");
            strSql.Append("[ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] )");
            strSql.Append(" values (");
            strSql.Append("@ID,@所属公司,@所属员工,@主机类型,@操作系统,@系统优化软件,@PDF软件,@办公软件,@邮件收发软件,@聊天软件1,@聊天软件2,@视频播放软件1,@视频播放软件2,@音乐播放软件,@WEB浏览软件,@下载软件,@系统备份软件,@压缩软件,@平面设计软件1,@平面设计软件2,@平面设计软件3,@平面设计软件4,@三维设计软件1,@三维设计软件2,@网页制作软件1,@网页制作软件2,@财务软件1,@财务软件2,@财务软件3,@财务软件4,@杀毒软件,@安全防护软件,@打印机1,@打印机2,@打印机3,@打印机4,@扫描仪1,@扫描仪2,@Remarks,@CreateDate,@CreateBy,@ModifyDate,@ModifyBy)");

            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, this.ID);
            if (this.所属公司 == null)
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, this.所属公司.Value);
            }
            if (this.所属员工 == null)
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, this.所属员工.Value);
            }
            if (this.主机类型 == null)
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, this.主机类型.Value);
            }
            if (this.操作系统 == null)
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, this.操作系统.Value);
            }
            if (this.系统优化软件 == null)
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, this.系统优化软件.Value);
            }
            if (this.PDF软件 == null)
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, this.PDF软件.Value);
            }
            if (this.办公软件 == null)
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, this.办公软件.Value);
            }
            if (this.邮件收发软件 == null)
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, this.邮件收发软件.Value);
            }
            if (this.聊天软件1 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, this.聊天软件1.Value);
            }
            if (this.聊天软件2 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, this.聊天软件2.Value);
            }
            if (this.视频播放软件1 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, this.视频播放软件1.Value);
            }
            if (this.视频播放软件2 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, this.视频播放软件2.Value);
            }
            if (this.音乐播放软件 == null)
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, this.音乐播放软件.Value);
            }
            if (this.WEB浏览软件 == null)
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, this.WEB浏览软件.Value);
            }
            if (this.下载软件 == null)
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, this.下载软件.Value);
            }
            if (this.系统备份软件 == null)
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, this.系统备份软件.Value);
            }
            if (this.压缩软件 == null)
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, this.压缩软件.Value);
            }
            if (this.平面设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, this.平面设计软件1.Value);
            }
            if (this.平面设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, this.平面设计软件2.Value);
            }
            if (this.平面设计软件3 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, this.平面设计软件3.Value);
            }
            if (this.平面设计软件4 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, this.平面设计软件4.Value);
            }
            if (this.三维设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, this.三维设计软件1.Value);
            }
            if (this.三维设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, this.三维设计软件2.Value);
            }
            if (this.网页制作软件1 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, this.网页制作软件1.Value);
            }
            if (this.网页制作软件2 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, this.网页制作软件2.Value);
            }
            if (this.财务软件1 == null)
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, this.财务软件1.Value);
            }
            if (this.财务软件2 == null)
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, this.财务软件2.Value);
            }
            if (this.财务软件3 == null)
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, this.财务软件3.Value);
            }
            if (this.财务软件4 == null)
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, this.财务软件4.Value);
            }
            if (this.杀毒软件 == null)
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, this.杀毒软件.Value);
            }
            if (this.安全防护软件 == null)
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, this.安全防护软件.Value);
            }
            db.AddInParameter(dbCommand, "打印机1", DbType.String, this.打印机1);
            db.AddInParameter(dbCommand, "打印机2", DbType.String, this.打印机2);
            db.AddInParameter(dbCommand, "打印机3", DbType.String, this.打印机3);
            db.AddInParameter(dbCommand, "打印机4", DbType.String, this.打印机4);
            db.AddInParameter(dbCommand, "扫描仪1", DbType.String, this.扫描仪1);
            db.AddInParameter(dbCommand, "扫描仪2", DbType.String, this.扫描仪2);
            db.AddInParameter(dbCommand, "Remarks", DbType.String, this.Remarks);
            if (this.CreateDate == null)
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, this.CreateDate.Value);
            }
            if (this.CreateBy == null)
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, this.CreateBy.Value);
            }
            if (this.ModifyDate == null)
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, this.ModifyDate.Value);
            }
            if (this.ModifyBy == null)
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, this.ModifyBy.Value);
            }

            return db.ExecuteNonQuery(dbCommand);


        }



        /// <summary>
        /// 保存实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public override int Save(tbCustEmpSoftListEntity entity)
        {

            if (entity.ID == 0)
            {
                entity.ID = GetMax("tb_CustEmpSoftList");
            }
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into  tb_CustEmpSoftList (");
            strSql.Append("[ID],[所属公司],[所属员工],[主机类型],[操作系统],[系统优化软件],[PDF软件],[办公软件],[邮件收发软件],[聊天软件1],[聊天软件2],[视频播放软件1],[视频播放软件2],[音乐播放软件],[WEB浏览软件],[下载软件],[系统备份软件],[压缩软件],[平面设计软件1],[平面设计软件2],[平面设计软件3],[平面设计软件4],[三维设计软件1],[三维设计软件2],[网页制作软件1],[网页制作软件2],[财务软件1],[财务软件2],[财务软件3],[财务软件4],[杀毒软件],[安全防护软件],[打印机1],[打印机2],[打印机3],[打印机4],[扫描仪1],[扫描仪2],[Remarks],[CreateDate],[CreateBy],[ModifyDate],[ModifyBy] )");
            strSql.Append(" values (");
            strSql.Append("@ID,@所属公司,@所属员工,@主机类型,@操作系统,@系统优化软件,@PDF软件,@办公软件,@邮件收发软件,@聊天软件1,@聊天软件2,@视频播放软件1,@视频播放软件2,@音乐播放软件,@WEB浏览软件,@下载软件,@系统备份软件,@压缩软件,@平面设计软件1,@平面设计软件2,@平面设计软件3,@平面设计软件4,@三维设计软件1,@三维设计软件2,@网页制作软件1,@网页制作软件2,@财务软件1,@财务软件2,@财务软件3,@财务软件4,@杀毒软件,@安全防护软件,@打印机1,@打印机2,@打印机3,@打印机4,@扫描仪1,@扫描仪2,@Remarks,@CreateDate,@CreateBy,@ModifyDate,@ModifyBy)");

            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, entity.ID);
            if (entity.所属公司 == null)
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, entity.所属公司.Value);
            }
            if (entity.所属员工 == null)
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, entity.所属员工.Value);
            }
            if (entity.主机类型 == null)
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, entity.主机类型.Value);
            }
            if (entity.操作系统 == null)
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, entity.操作系统.Value);
            }
            if (entity.系统优化软件 == null)
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, entity.系统优化软件.Value);
            }
            if (entity.PDF软件 == null)
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, entity.PDF软件.Value);
            }
            if (entity.办公软件 == null)
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, entity.办公软件.Value);
            }
            if (entity.邮件收发软件 == null)
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, entity.邮件收发软件.Value);
            }
            if (entity.聊天软件1 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, entity.聊天软件1.Value);
            }
            if (entity.聊天软件2 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, entity.聊天软件2.Value);
            }
            if (entity.视频播放软件1 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, entity.视频播放软件1.Value);
            }
            if (entity.视频播放软件2 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, entity.视频播放软件2.Value);
            }
            if (entity.音乐播放软件 == null)
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, entity.音乐播放软件.Value);
            }
            if (entity.WEB浏览软件 == null)
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, entity.WEB浏览软件.Value);
            }
            if (entity.下载软件 == null)
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, entity.下载软件.Value);
            }
            if (entity.系统备份软件 == null)
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, entity.系统备份软件.Value);
            }
            if (entity.压缩软件 == null)
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, entity.压缩软件.Value);
            }
            if (entity.平面设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, entity.平面设计软件1.Value);
            }
            if (entity.平面设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, entity.平面设计软件2.Value);
            }
            if (entity.平面设计软件3 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, entity.平面设计软件3.Value);
            }
            if (entity.平面设计软件4 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, entity.平面设计软件4.Value);
            }
            if (entity.三维设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, entity.三维设计软件1.Value);
            }
            if (entity.三维设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, entity.三维设计软件2.Value);
            }
            if (entity.网页制作软件1 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, entity.网页制作软件1.Value);
            }
            if (entity.网页制作软件2 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, entity.网页制作软件2.Value);
            }
            if (entity.财务软件1 == null)
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, entity.财务软件1.Value);
            }
            if (entity.财务软件2 == null)
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, entity.财务软件2.Value);
            }
            if (entity.财务软件3 == null)
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, entity.财务软件3.Value);
            }
            if (entity.财务软件4 == null)
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, entity.财务软件4.Value);
            }
            if (entity.杀毒软件 == null)
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, entity.杀毒软件.Value);
            }
            if (entity.安全防护软件 == null)
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, entity.安全防护软件.Value);
            }
            db.AddInParameter(dbCommand, "打印机1", DbType.String, entity.打印机1);
            db.AddInParameter(dbCommand, "打印机2", DbType.String, entity.打印机2);
            db.AddInParameter(dbCommand, "打印机3", DbType.String, entity.打印机3);
            db.AddInParameter(dbCommand, "打印机4", DbType.String, entity.打印机4);
            db.AddInParameter(dbCommand, "扫描仪1", DbType.String, entity.扫描仪1);
            db.AddInParameter(dbCommand, "扫描仪2", DbType.String, entity.扫描仪2);
            db.AddInParameter(dbCommand, "Remarks", DbType.String, entity.Remarks);
            if (entity.CreateDate == null)
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, entity.CreateDate.Value);
            }
            if (entity.CreateBy == null)
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, entity.CreateBy.Value);
            }
            if (entity.ModifyDate == null)
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, entity.ModifyDate.Value);
            }
            if (entity.ModifyBy == null)
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, entity.ModifyBy.Value);
            }

            return db.ExecuteNonQuery(dbCommand);


        }


        /// <summary>
        /// 保存或者更新(如果传入的实体主键为空则保存,否则做更新操作)
        /// </summary>
        /// <param name="entity">传入的实体</param>
        /// <returns>影响的行数</returns>
        public override int SaveOrUpdate(tbCustEmpSoftListEntity entity)
        {

            if (entity.ID == 0)
            {
                if (Save(entity) > 0)
                {
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
            else
            {
                return Update(entity);
            }
        }

        /// <summary>
        /// 保存或者更新(如果传入的实体主键为空则保存,否则做更新操作)
        /// </summary>
        /// <param name="entity">传入的实体</param>
        /// <returns>影响的行数</returns>
        public override int SaveOrUpdate()
        {

            if (this.ID == 0)
            {
                if (Save() > 0)
                {
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
            else
            {
                return Update();
            }
        }

        /// <summary>
        /// 是否存在对应主键ID的记录
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public override bool IsExist(int ID)
        {
            Database db = GetDatabase();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from tb_CustEmpSoftList where ID=@ID ");

            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, ID);//这里为ID是因为原有代码把主键都变成了ID.
            int cmdresult;
            object obj = db.ExecuteScalar(dbCommand);
            if ((Object.Equals(obj, null)) || (Object.Equals(obj, System.DBNull.Value)))
            {
                cmdresult = 0;
            }
            else
            {
                cmdresult = int.Parse(obj.ToString());
            }
            if (cmdresult == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }


        /// <summary>
        /// 删除对应的实体
        /// </summary>
        /// <param name="entity"></param>
        public override int Delete(tbCustEmpSoftListEntity entity)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete tb_CustEmpSoftList ");
            strSql.Append(" where ID=@ID ");
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, entity.ID);
            return db.ExecuteNonQuery(dbCommand);
        }

        /// <summary>
        /// 删除主键ID对应的记录
        /// </summary>
        /// <param name="id"></param>
        public override int Delete(int id)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete tb_CustEmpSoftList ");
            strSql.Append(" where ID=@ID ");
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, id);
            return db.ExecuteNonQuery(dbCommand);
        }


        /// <summary>
        /// 更新一条数据
        /// </summary>
        public override int Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update tb_CustEmpSoftList set ");
            strSql.Append("[ID]=@ID,[所属公司]=@所属公司,[所属员工]=@所属员工,[主机类型]=@主机类型,[操作系统]=@操作系统,[系统优化软件]=@系统优化软件,[PDF软件]=@PDF软件,[办公软件]=@办公软件,[邮件收发软件]=@邮件收发软件,[聊天软件1]=@聊天软件1,[聊天软件2]=@聊天软件2,[视频播放软件1]=@视频播放软件1,[视频播放软件2]=@视频播放软件2,[音乐播放软件]=@音乐播放软件,[WEB浏览软件]=@WEB浏览软件,[下载软件]=@下载软件,[系统备份软件]=@系统备份软件,[压缩软件]=@压缩软件,[平面设计软件1]=@平面设计软件1,[平面设计软件2]=@平面设计软件2,[平面设计软件3]=@平面设计软件3,[平面设计软件4]=@平面设计软件4,[三维设计软件1]=@三维设计软件1,[三维设计软件2]=@三维设计软件2,[网页制作软件1]=@网页制作软件1,[网页制作软件2]=@网页制作软件2,[财务软件1]=@财务软件1,[财务软件2]=@财务软件2,[财务软件3]=@财务软件3,[财务软件4]=@财务软件4,[杀毒软件]=@杀毒软件,[安全防护软件]=@安全防护软件,[打印机1]=@打印机1,[打印机2]=@打印机2,[打印机3]=@打印机3,[打印机4]=@打印机4,[扫描仪1]=@扫描仪1,[扫描仪2]=@扫描仪2,[Remarks]=@Remarks,[CreateDate]=@CreateDate,[CreateBy]=@CreateBy,[ModifyDate]=@ModifyDate,[ModifyBy]=@ModifyBy ");

            strSql.Append(" where ID=@ID ");
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, this.ID);
            if (this.所属公司 == null)
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, this.所属公司.Value);
            }
            if (this.所属员工 == null)
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, this.所属员工.Value);
            }
            if (this.主机类型 == null)
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, this.主机类型.Value);
            }
            if (this.操作系统 == null)
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, this.操作系统.Value);
            }
            if (this.系统优化软件 == null)
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, this.系统优化软件.Value);
            }
            if (this.PDF软件 == null)
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, this.PDF软件.Value);
            }
            if (this.办公软件 == null)
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, this.办公软件.Value);
            }
            if (this.邮件收发软件 == null)
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, this.邮件收发软件.Value);
            }
            if (this.聊天软件1 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, this.聊天软件1.Value);
            }
            if (this.聊天软件2 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, this.聊天软件2.Value);
            }
            if (this.视频播放软件1 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, this.视频播放软件1.Value);
            }
            if (this.视频播放软件2 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, this.视频播放软件2.Value);
            }
            if (this.音乐播放软件 == null)
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, this.音乐播放软件.Value);
            }
            if (this.WEB浏览软件 == null)
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, this.WEB浏览软件.Value);
            }
            if (this.下载软件 == null)
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, this.下载软件.Value);
            }
            if (this.系统备份软件 == null)
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, this.系统备份软件.Value);
            }
            if (this.压缩软件 == null)
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, this.压缩软件.Value);
            }
            if (this.平面设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, this.平面设计软件1.Value);
            }
            if (this.平面设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, this.平面设计软件2.Value);
            }
            if (this.平面设计软件3 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, this.平面设计软件3.Value);
            }
            if (this.平面设计软件4 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, this.平面设计软件4.Value);
            }
            if (this.三维设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, this.三维设计软件1.Value);
            }
            if (this.三维设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, this.三维设计软件2.Value);
            }
            if (this.网页制作软件1 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, this.网页制作软件1.Value);
            }
            if (this.网页制作软件2 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, this.网页制作软件2.Value);
            }
            if (this.财务软件1 == null)
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, this.财务软件1.Value);
            }
            if (this.财务软件2 == null)
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, this.财务软件2.Value);
            }
            if (this.财务软件3 == null)
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, this.财务软件3.Value);
            }
            if (this.财务软件4 == null)
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, this.财务软件4.Value);
            }
            if (this.杀毒软件 == null)
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, this.杀毒软件.Value);
            }
            if (this.安全防护软件 == null)
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, this.安全防护软件.Value);
            }
            db.AddInParameter(dbCommand, "打印机1", DbType.String, this.打印机1);
            db.AddInParameter(dbCommand, "打印机2", DbType.String, this.打印机2);
            db.AddInParameter(dbCommand, "打印机3", DbType.String, this.打印机3);
            db.AddInParameter(dbCommand, "打印机4", DbType.String, this.打印机4);
            db.AddInParameter(dbCommand, "扫描仪1", DbType.String, this.扫描仪1);
            db.AddInParameter(dbCommand, "扫描仪2", DbType.String, this.扫描仪2);
            db.AddInParameter(dbCommand, "Remarks", DbType.String, this.Remarks);
            if (this.CreateDate == null)
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, this.CreateDate.Value);
            }
            if (this.CreateBy == null)
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, this.CreateBy.Value);
            }
            if (this.ModifyDate == null)
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, this.ModifyDate.Value);
            }
            if (this.ModifyBy == null)
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, this.ModifyBy.Value);
            }


            return db.ExecuteNonQuery(dbCommand);

        }





        /// <summary>
        /// 更新一条数据
        /// </summary>
        public override int Update(tbCustEmpSoftListEntity entity)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update tb_CustEmpSoftList set ");
            strSql.Append("[ID]=@ID,[所属公司]=@所属公司,[所属员工]=@所属员工,[主机类型]=@主机类型,[操作系统]=@操作系统,[系统优化软件]=@系统优化软件,[PDF软件]=@PDF软件,[办公软件]=@办公软件,[邮件收发软件]=@邮件收发软件,[聊天软件1]=@聊天软件1,[聊天软件2]=@聊天软件2,[视频播放软件1]=@视频播放软件1,[视频播放软件2]=@视频播放软件2,[音乐播放软件]=@音乐播放软件,[WEB浏览软件]=@WEB浏览软件,[下载软件]=@下载软件,[系统备份软件]=@系统备份软件,[压缩软件]=@压缩软件,[平面设计软件1]=@平面设计软件1,[平面设计软件2]=@平面设计软件2,[平面设计软件3]=@平面设计软件3,[平面设计软件4]=@平面设计软件4,[三维设计软件1]=@三维设计软件1,[三维设计软件2]=@三维设计软件2,[网页制作软件1]=@网页制作软件1,[网页制作软件2]=@网页制作软件2,[财务软件1]=@财务软件1,[财务软件2]=@财务软件2,[财务软件3]=@财务软件3,[财务软件4]=@财务软件4,[杀毒软件]=@杀毒软件,[安全防护软件]=@安全防护软件,[打印机1]=@打印机1,[打印机2]=@打印机2,[打印机3]=@打印机3,[打印机4]=@打印机4,[扫描仪1]=@扫描仪1,[扫描仪2]=@扫描仪2,[Remarks]=@Remarks,[CreateDate]=@CreateDate,[CreateBy]=@CreateBy,[ModifyDate]=@ModifyDate,[ModifyBy]=@ModifyBy ");

            strSql.Append(" where ID=@ID ");
            Database db = GetDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());
            db.AddInParameter(dbCommand, "ID", DbType.Int32, entity.ID);
            if (entity.所属公司 == null)
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属公司", DbType.Int32, entity.所属公司.Value);
            }
            if (entity.所属员工 == null)
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "所属员工", DbType.Int32, entity.所属员工.Value);
            }
            if (entity.主机类型 == null)
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "主机类型", DbType.Int32, entity.主机类型.Value);
            }
            if (entity.操作系统 == null)
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "操作系统", DbType.Int32, entity.操作系统.Value);
            }
            if (entity.系统优化软件 == null)
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统优化软件", DbType.Int32, entity.系统优化软件.Value);
            }
            if (entity.PDF软件 == null)
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "PDF软件", DbType.Int32, entity.PDF软件.Value);
            }
            if (entity.办公软件 == null)
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "办公软件", DbType.Int32, entity.办公软件.Value);
            }
            if (entity.邮件收发软件 == null)
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "邮件收发软件", DbType.Int32, entity.邮件收发软件.Value);
            }
            if (entity.聊天软件1 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件1", DbType.Int32, entity.聊天软件1.Value);
            }
            if (entity.聊天软件2 == null)
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "聊天软件2", DbType.Int32, entity.聊天软件2.Value);
            }
            if (entity.视频播放软件1 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件1", DbType.Int32, entity.视频播放软件1.Value);
            }
            if (entity.视频播放软件2 == null)
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "视频播放软件2", DbType.Int32, entity.视频播放软件2.Value);
            }
            if (entity.音乐播放软件 == null)
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "音乐播放软件", DbType.Int32, entity.音乐播放软件.Value);
            }
            if (entity.WEB浏览软件 == null)
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "WEB浏览软件", DbType.Int32, entity.WEB浏览软件.Value);
            }
            if (entity.下载软件 == null)
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "下载软件", DbType.Int32, entity.下载软件.Value);
            }
            if (entity.系统备份软件 == null)
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "系统备份软件", DbType.Int32, entity.系统备份软件.Value);
            }
            if (entity.压缩软件 == null)
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "压缩软件", DbType.Int32, entity.压缩软件.Value);
            }
            if (entity.平面设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件1", DbType.Int32, entity.平面设计软件1.Value);
            }
            if (entity.平面设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件2", DbType.Int32, entity.平面设计软件2.Value);
            }
            if (entity.平面设计软件3 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件3", DbType.Int32, entity.平面设计软件3.Value);
            }
            if (entity.平面设计软件4 == null)
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "平面设计软件4", DbType.Int32, entity.平面设计软件4.Value);
            }
            if (entity.三维设计软件1 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件1", DbType.Int32, entity.三维设计软件1.Value);
            }
            if (entity.三维设计软件2 == null)
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "三维设计软件2", DbType.Int32, entity.三维设计软件2.Value);
            }
            if (entity.网页制作软件1 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件1", DbType.Int32, entity.网页制作软件1.Value);
            }
            if (entity.网页制作软件2 == null)
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "网页制作软件2", DbType.Int32, entity.网页制作软件2.Value);
            }
            if (entity.财务软件1 == null)
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件1", DbType.Int32, entity.财务软件1.Value);
            }
            if (entity.财务软件2 == null)
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件2", DbType.Int32, entity.财务软件2.Value);
            }
            if (entity.财务软件3 == null)
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件3", DbType.Int32, entity.财务软件3.Value);
            }
            if (entity.财务软件4 == null)
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "财务软件4", DbType.Int32, entity.财务软件4.Value);
            }
            if (entity.杀毒软件 == null)
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "杀毒软件", DbType.Int32, entity.杀毒软件.Value);
            }
            if (entity.安全防护软件 == null)
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "安全防护软件", DbType.Int32, entity.安全防护软件.Value);
            }
            db.AddInParameter(dbCommand, "打印机1", DbType.String, entity.打印机1);
            db.AddInParameter(dbCommand, "打印机2", DbType.String, entity.打印机2);
            db.AddInParameter(dbCommand, "打印机3", DbType.String, entity.打印机3);
            db.AddInParameter(dbCommand, "打印机4", DbType.String, entity.打印机4);
            db.AddInParameter(dbCommand, "扫描仪1", DbType.String, entity.扫描仪1);
            db.AddInParameter(dbCommand, "扫描仪2", DbType.String, entity.扫描仪2);
            db.AddInParameter(dbCommand, "Remarks", DbType.String, entity.Remarks);
            if (entity.CreateDate == null)
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateDate", DbType.DateTime, entity.CreateDate.Value);
            }
            if (entity.CreateBy == null)
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "CreateBy", DbType.Int32, entity.CreateBy.Value);
            }
            if (entity.ModifyDate == null)
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyDate", DbType.DateTime, entity.ModifyDate.Value);
            }
            if (entity.ModifyBy == null)
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, System.DBNull.Value);
            }
            else
            {
                db.AddInParameter(dbCommand, "ModifyBy", DbType.Int32, entity.ModifyBy.Value);
            }


            return db.ExecuteNonQuery(dbCommand);

        }







        /// <summary>
        /// 对象实体绑定数据
        ///生成构造为list的构造器
        /// </summary>
        private tbCustEmpSoftListEntity ReaderBind(IDataReader dataReader, int seq)
        {
            ITOMMS.Entity.tbCustEmpSoftListEntity entity = new ITOMMS.Entity.tbCustEmpSoftListEntity();
            entity.SEQNO = seq;
            object obj;
            obj = dataReader["ID"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ID = (int)obj;
            }
            obj = dataReader["所属公司"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.所属公司 = (int)obj;
            }
            obj = dataReader["所属员工"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.所属员工 = (int)obj;
            }
            obj = dataReader["主机类型"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.主机类型 = (int)obj;
            }
            obj = dataReader["操作系统"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.操作系统 = (int)obj;
            }
            obj = dataReader["系统优化软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.系统优化软件 = (int)obj;
            }
            obj = dataReader["PDF软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.PDF软件 = (int)obj;
            }
            obj = dataReader["办公软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.办公软件 = (int)obj;
            }
            obj = dataReader["邮件收发软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.邮件收发软件 = (int)obj;
            }
            obj = dataReader["聊天软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.聊天软件1 = (int)obj;
            }
            obj = dataReader["聊天软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.聊天软件2 = (int)obj;
            }
            obj = dataReader["视频播放软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.视频播放软件1 = (int)obj;
            }
            obj = dataReader["视频播放软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.视频播放软件2 = (int)obj;
            }
            obj = dataReader["音乐播放软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.音乐播放软件 = (int)obj;
            }
            obj = dataReader["WEB浏览软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.WEB浏览软件 = (int)obj;
            }
            obj = dataReader["下载软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.下载软件 = (int)obj;
            }
            obj = dataReader["系统备份软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.系统备份软件 = (int)obj;
            }
            obj = dataReader["压缩软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.压缩软件 = (int)obj;
            }
            obj = dataReader["平面设计软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件1 = (int)obj;
            }
            obj = dataReader["平面设计软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件2 = (int)obj;
            }
            obj = dataReader["平面设计软件3"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件3 = (int)obj;
            }
            obj = dataReader["平面设计软件4"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件4 = (int)obj;
            }
            obj = dataReader["三维设计软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.三维设计软件1 = (int)obj;
            }
            obj = dataReader["三维设计软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.三维设计软件2 = (int)obj;
            }
            obj = dataReader["网页制作软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.网页制作软件1 = (int)obj;
            }
            obj = dataReader["网页制作软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.网页制作软件2 = (int)obj;
            }
            obj = dataReader["财务软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件1 = (int)obj;
            }
            obj = dataReader["财务软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件2 = (int)obj;
            }
            obj = dataReader["财务软件3"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件3 = (int)obj;
            }
            obj = dataReader["财务软件4"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件4 = (int)obj;
            }
            obj = dataReader["杀毒软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.杀毒软件 = (int)obj;
            }
            obj = dataReader["安全防护软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.安全防护软件 = (int)obj;
            }
            entity.打印机1 = dataReader["打印机1"].ToString();
            entity.打印机2 = dataReader["打印机2"].ToString();
            entity.打印机3 = dataReader["打印机3"].ToString();
            entity.打印机4 = dataReader["打印机4"].ToString();
            entity.扫描仪1 = dataReader["扫描仪1"].ToString();
            entity.扫描仪2 = dataReader["扫描仪2"].ToString();
            entity.Remarks = dataReader["Remarks"].ToString();
            obj = dataReader["CreateDate"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.CreateDate = (DateTime)obj;
            }
            obj = dataReader["CreateBy"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.CreateBy = (int)obj;
            }
            obj = dataReader["ModifyDate"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ModifyDate = (DateTime)obj;
            }
            obj = dataReader["ModifyBy"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ModifyBy = (int)obj;
            }

            return entity;
        }


        /// <summary>
        /// 对象实体绑定数据
        ///生成构造为list的构造器
        /// </summary>
        private tbCustEmpSoftListEntity ReaderBind(IDataReader dataReader)
        {
            ITOMMS.Entity.tbCustEmpSoftListEntity entity = new ITOMMS.Entity.tbCustEmpSoftListEntity();
            object obj;
            obj = dataReader["ID"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ID = (int)obj;
            }
            obj = dataReader["所属公司"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.所属公司 = (int)obj;
            }
            obj = dataReader["所属员工"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.所属员工 = (int)obj;
            }
            obj = dataReader["主机类型"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.主机类型 = (int)obj;
            }
            obj = dataReader["操作系统"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.操作系统 = (int)obj;
            }
            obj = dataReader["系统优化软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.系统优化软件 = (int)obj;
            }
            obj = dataReader["PDF软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.PDF软件 = (int)obj;
            }
            obj = dataReader["办公软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.办公软件 = (int)obj;
            }
            obj = dataReader["邮件收发软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.邮件收发软件 = (int)obj;
            }
            obj = dataReader["聊天软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.聊天软件1 = (int)obj;
            }
            obj = dataReader["聊天软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.聊天软件2 = (int)obj;
            }
            obj = dataReader["视频播放软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.视频播放软件1 = (int)obj;
            }
            obj = dataReader["视频播放软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.视频播放软件2 = (int)obj;
            }
            obj = dataReader["音乐播放软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.音乐播放软件 = (int)obj;
            }
            obj = dataReader["WEB浏览软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.WEB浏览软件 = (int)obj;
            }
            obj = dataReader["下载软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.下载软件 = (int)obj;
            }
            obj = dataReader["系统备份软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.系统备份软件 = (int)obj;
            }
            obj = dataReader["压缩软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.压缩软件 = (int)obj;
            }
            obj = dataReader["平面设计软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件1 = (int)obj;
            }
            obj = dataReader["平面设计软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件2 = (int)obj;
            }
            obj = dataReader["平面设计软件3"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件3 = (int)obj;
            }
            obj = dataReader["平面设计软件4"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.平面设计软件4 = (int)obj;
            }
            obj = dataReader["三维设计软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.三维设计软件1 = (int)obj;
            }
            obj = dataReader["三维设计软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.三维设计软件2 = (int)obj;
            }
            obj = dataReader["网页制作软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.网页制作软件1 = (int)obj;
            }
            obj = dataReader["网页制作软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.网页制作软件2 = (int)obj;
            }
            obj = dataReader["财务软件1"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件1 = (int)obj;
            }
            obj = dataReader["财务软件2"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件2 = (int)obj;
            }
            obj = dataReader["财务软件3"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件3 = (int)obj;
            }
            obj = dataReader["财务软件4"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.财务软件4 = (int)obj;
            }
            obj = dataReader["杀毒软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.杀毒软件 = (int)obj;
            }
            obj = dataReader["安全防护软件"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.安全防护软件 = (int)obj;
            }
            entity.打印机1 = dataReader["打印机1"].ToString();
            entity.打印机2 = dataReader["打印机2"].ToString();
            entity.打印机3 = dataReader["打印机3"].ToString();
            entity.打印机4 = dataReader["打印机4"].ToString();
            entity.扫描仪1 = dataReader["扫描仪1"].ToString();
            entity.扫描仪2 = dataReader["扫描仪2"].ToString();
            entity.Remarks = dataReader["Remarks"].ToString();
            obj = dataReader["CreateDate"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.CreateDate = (DateTime)obj;
            }
            obj = dataReader["CreateBy"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.CreateBy = (int)obj;
            }
            obj = dataReader["ModifyDate"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ModifyDate = (DateTime)obj;
            }
            obj = dataReader["ModifyBy"];
            if (obj != null && obj != DBNull.Value)
            {
                entity.ModifyBy = (int)obj;
            }

            return entity;
        }



        #endregion

    }
}
